{% extends 'trp/base.html'%}
{% block content %}
<!-- 媒体管理——管理员 -->
<div class="pageheader">
    <a class="btn-create createmedia" href="javascript:;"><span class="glyphicon glyphicon-plus"></span>新增媒体</a>
    <div class="searchbox pull-right">
        <label>搜索<input id="term" class="searchbox-ipt" placeholder="按名称、属性模糊搜索" type="text"></label>
        <a class="searchbox-btn" href="javascript:;"></a>
    </div>
    <div class="dropbox pull-right">
	    <select name="media_type" style="width:150px;" placeholder="按媒体类型搜索">
	    	<option value=""></option>
			<option value="">全部媒体</option>
			<option value="1">站外</option>
			<option value="0">站内</option>
			<option value="2">联盟</option>
		</select>
    </div>
</div>
<div class="pagebox">
	<table id="mediaResources" class="grid" width="100%">
	    <thead>
	        <tr>
	            <th>媒体名称</th>
	            <th>媒体类型</th>
	            <th>媒体属性</th>
	            <th minwidth="150">操作</th>
	        </tr>
	    </thead>
	    <tbody>
	    	<tr><td colspan="4" class="loading">&nbsp;</td></tr>
	    </tbody>
	</table>
</div>
<div class=" pop-form form-group pop-createmedia" style="display:none;">
	<form class="mediaForm">
		<div class="form_item">
			<label class="form_label">媒体名称：</label>
			<div class="form_ctrl media_name"><input type="text" name="media_name" class="form-control required" maxlength="40" placeholder="请填写名称..." /></div>
		</div>
		<div class="form_item" style="height:auto">
			<label class="form_label">媒体类型：</label>
			<div class="form_ctrl media_type">
				<select name="media_type" style="width:235px;" placeholder="请选择类型...">
					<option value="1">站外</option>
					<option value="0">站内</option>
					<option value="2">联盟</option>
				</select>
			</div>
		</div>
		<div class="form_item" style="height:auto">
			<label class="form_label">媒体属性：</label>
			<div class="form_ctrl media_attrs">
				<select name="media_attrs" multiple style="width:235px;" placeholder="请选择属性..."></select><a class="btn-create createattr red" style="margin:0 0 0 5px;font-size:12px;" href="javascript:;" title="新增媒体属性"><span class="glyphicon glyphicon-plus"></span></a>
			</div>
		</div>
	</form>
</div>
<div class=" pop-form form-group pop-createattr" style="display:none;">
	<form class="attrForm">
		<div class="form_item">
			<label class="form_label">媒体属性名称：</label>
			<div class="form_ctrl media_name"><input type="text" name="attr_name" class="form-control required" maxlength="40" placeholder="请填写名称..." /></div>
		</div>
	</form>
</div>
<script>seajs.use('trp/js/media');</script>
{% endblock %}